package com.antdesignbackend.backend.service.impl;

import com.antdesignbackend.backend.entity.Dictionary;
import com.antdesignbackend.backend.entity.entityVo.DictionaryVo;
import com.antdesignbackend.backend.mapper.DictionaryMapper;
import com.antdesignbackend.backend.service.IDictionaryService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DictionaryServiceImpl extends ServiceImpl<DictionaryMapper, Dictionary> implements IDictionaryService {
    @Autowired
    private DictionaryMapper dictionaryMapper;

    @Override
    public void deleteById(int id) {
        dictionaryMapper.deleteById(id);
    }

    @Override
    public List<DictionaryVo> filter(QueryWrapper<DictionaryVo> queryWrapper) {
        return dictionaryMapper.filter(queryWrapper);
    }

    @Override
    public List<DictionaryVo> search(QueryWrapper<DictionaryVo> queryWrapper, Page<DictionaryVo> page) {
        return dictionaryMapper.search(queryWrapper, page);
    }
    @Override
    public Integer count(QueryWrapper<DictionaryVo> queryWrapper) {
        return dictionaryMapper.count(queryWrapper);
    }

}
